﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Thirteen23.TED.Data;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;

namespace Thirteen23.TED.Converters
{
    public class SortTileVisibilityConverter : IValueConverter
    {
        public object Convert(object value, string typeName, object parameter, string language)
        {
            if (value != null && value is TedTalk)
            {
                return Visibility.Collapsed;
            }

            return Visibility.Visible;
        }

        public object ConvertBack(object value, string typeName, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }

    public class SortTileContentConverter : IValueConverter
    {
        public object Convert(object value, string typeName, object parameter, string language)
        {
            if (value != null && value is TedTalk)
            {
                return null;
            }

            return value;
        }

        public object ConvertBack(object value, string typeName, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
